Skip to main content
Version: Upcoming

CurrencyTransaction

V8 Message Definiton

METADATA

AttributeValue
Topic4740-risk-v5
MLink TokenClientRisk
ProductSRRisk
accessTypeSELECT

Table Definition

FieldTypeKeyDefault ValueComment
transactionIDBIGINTPRI0
tradeDateDATEPRI'1900-01-01'
accntVARCHAR(16)''
clientFirmVARCHAR(16)''
botCurrencyenum - Currency'None'
botQuantityDOUBLE0
sldCurrencyenum - Currency'None'
sldQuantityDOUBLE0
commentTINYTEXT''
transactionDttmDATETIME(6)'1900-01-01 00:00:00.000000'
timestampDATETIME(6)'1900-01-01 00:00:00.000000'

PRIMARY KEY DEFINITION (Unique)

FieldSequence
transactionID1
tradeDate2

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRRisk`.`MsgCurrencyTransaction` (
`transactionID` BIGINT NOT NULL DEFAULT 0,
`tradeDate` DATE NOT NULL DEFAULT '1900-01-01',
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '',
`botCurrency` ENUM('None','AUD','BRL','CAD','CHF','CNH','CNY','EUR','GBP','JPY','KRW','MXN','MYR','NOK','NZD','SEK','TRY','USD','USDCents','CZK','ZAR','HUF','USX','GBX') NOT NULL DEFAULT 'None',
`botQuantity` DOUBLE NOT NULL DEFAULT 0,
`sldCurrency` ENUM('None','AUD','BRL','CAD','CHF','CNH','CNY','EUR','GBP','JPY','KRW','MXN','MYR','NOK','NZD','SEK','TRY','USD','USDCents','CZK','ZAR','HUF','USX','GBX') NOT NULL DEFAULT 'None',
`sldQuantity` DOUBLE NOT NULL DEFAULT 0,
`comment` TINYTEXT NOT NULL DEFAULT '',
`transactionDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`transactionID`,`tradeDate`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='';

SELECT TABLE EXAMPLE QUERY

SELECT
`transactionID`,
`tradeDate`,
`accnt`,
`clientFirm`,
`botCurrency`,
`botQuantity`,
`sldCurrency`,
`sldQuantity`,
`comment`,
`transactionDttm`,
`timestamp`
FROM `SRRisk`.`MsgCurrencyTransaction`
WHERE
/* Replace with a BIGINT */
`transactionID` = 1234567890
AND
/* Replace with a DATE */
`tradeDate` = '2022-01-01';

Doc Columns Query

SELECT * FROM SRRisk.doccolumns WHERE TABLE_NAME='CurrencyTransaction' ORDER BY ordinal_position ASC;